﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UI/HRManagerUI/HrManager.Master"
    AutoEventWireup="true" CodeBehind="Salary.aspx.cs" Inherits="HRM.UI.HRManagerUI.EmpSalary.AddSalary" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../../Styles/Salary/SalaryCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">

        function CheckField() {
            if (document.getElementById("<%=txtEmployeeCodepm.ClientID%>").value == "Please write Emp Code") {
                document.getElementById("<%=msgLevel.ClientID%>").textContent = "Please Enter Employee Code!";
                document.getElementById("<%=msgLevel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtEmployeeCodepm.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtGrossSalary.ClientID%>").Value == "0") {
                document.getElementById("<%=msgLevel.ClientID%>").textContent = "Please Enter Employee Gross Salary!";
                document.getElementById("<%=msgLevel.ClientID%>").style.color = "red";
                document.getElementById("<%=txtGrossSalary.ClientID%>").focus();
                return false;
            }

            return true;
        }
  

    </script>
    <div class="titlebar">
        Employee Salary Structure</div>
    <div align="center">
        <asp:Label runat="server" ID="msgLevel"></asp:Label></div>
    <table class="salaryTB">
        <tr>
            <td class="Label">
                Employee Code
            </td>
            <td class="Field">
                <input type="text" runat="server" value="Please write Emp Code" class="textboxinput"
                    id="txtEmployeeCodepm" onblur="if (this.value == '') {this.value = 'Please write Emp Code';}"
                    onfocus="if (this.value == 'Please write Emp Code') {this.value = '';}" />
                <span class="estaricStar">*</span>
        </tr>
        <tr>
            <td class="Label">
                Basic Salary
            </td>
            <td>
                <input type="text" id="txtBasicSalary" class="textboxinput" runat="server" value="0" onblur="if (this.value == '') {this.value = '0';}"
                    onfocus="if (this.value == '0') {this.value = '';}"/>
            </td>
        </tr>
        <tr>
            <td class="Label">
                Medical Allowance
            </td>
            <td>
                <input type="text" id="txtMedical" class="textboxinput" runat="server" value="0" onblur="if (this.value == '') {this.value = '0';}"
                    onfocus="if (this.value == '0') {this.value = '';}" />
            </td>
        </tr>
        <tr>
            <td class="Label">
                Residence Allowance
            </td>
            <td>
                <input type="text" id="txtResidence" class="textboxinput" runat="server" value="0" onblur="if (this.value == '') {this.value = '0';}"
                    onfocus="if (this.value == '0') {this.value = '';}" />
            </td>
        </tr>
        <tr>
            <td class="Label">
                Transport Allowance
            </td>
            <td>
                <input type="text" id="txtTransport" class="textboxinput" runat="server" value="0" onblur="if (this.value == '') {this.value = '0';}"
                    onfocus="if (this.value == '0') {this.value = '';}" />
            </td>
        </tr>
        <tr>
            <td class="Label">
                Profident Fund
            </td>
            <td>
                <input type="text" id="txtProfidentFund" class="textboxinput" runat="server" value="0" onblur="if (this.value == '') {this.value = '0';}"
                    onfocus="if (this.value == '0') {this.value = '';}" />
            </td>
        </tr>
        <tr>
            <td class="Label">
                Mobile Allowance
            </td>
            <td>
                <input type="text" id="txtMobile" class="textboxinput" runat="server" value="0" onblur="if (this.value == '') {this.value = '0';}"
                    onfocus="if (this.value == '0') {this.value = '';}" />
            </td>
        </tr>
        <tr>
            <td class="Label">
                Others Allowance
            </td>
            <td>
                <input type="text" id="txtOthers" class="textboxinput" runat="server" value="0" onblur="if (this.value == '') {this.value = '0';}"
                    onfocus="if (this.value == '0') {this.value = '';}" />
            </td>
        </tr>
        <tr>
            <td class="Label">
                Gross Salary
            </td>
            <td>
                <input type="text" id="txtGrossSalary" class="textboxinput" runat="server" value="0" onblur="if (this.value == '') {this.value = '0';}"
                    onfocus="if (this.value == '0') {this.value = '';}" /><span
                    class="estaricStar">*</span>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <input id="Submit1" type="submit" value="Add Salary" class="btnCss" runat="server"
                    onserverclick="SaveEmpSalary" onclick="return CheckField()" />
            </td>
        </tr>
    </table>
    <asp:GridView runat="server" ID="singleSalaryGdv" Width="100%">
    </asp:GridView>
</asp:Content>
